﻿using FluentMigrator;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Coevery.Database.Migrations
{
    [Migration(20121210175326)]
    public class _20121210175326_UpdateNotification : Migration
    {
        public override void Up()
        {
            string layoutXml = "<XtraSerializer version=\"1.0\" application=\"View\">    <property name=\"#LayoutVersion\" />    <property name=\"GroupPanelText\" />    <property name=\"NewItemRowText\" />    <property name=\"GroupFooterShowMode\">VisibleIfExpanded</property>    <property name=\"LevelIndent\">-1</property>    <property name=\"PreviewIndent\">-1</property>    <property name=\"PreviewLineCount\">-1</property>    <property name=\"BestFitMaxRowCount\">-1</property>    <property name=\"ScrollStyle\">LiveVertScroll, LiveHorzScroll</property>    <property name=\"FocusRectStyle\">RowFocus</property>    <property name=\"HorzScrollStep\">3</property>    <property name=\"PreviewFieldName\" />    <property name=\"ViewCaptionHeight\">-1</property>    <property name=\"ShowButtonMode\">ShowForFocusedCell</property>    <property name=\"Columns\" iskey=\"true\" value=\"6\">      <property name=\"Item1\" isnull=\"true\" iskey=\"true\">        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">0</property>        <property name=\"Width\">35</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colNotificationStatus</property>        <property name=\"OptionsColumn\" isnull=\"true\" iskey=\"true\">          <property name=\"ShowCaption\">false</property>          <property name=\"AllowEdit\">false</property>          <property name=\"AllowSize\">false</property>          <property name=\"AllowFocus\">false</property>          <property name=\"FixedWidth\">true</property>        </property>        <property name=\"ToolTip\">Icon</property>        <property name=\"ImageIndex\">1</property>        <property name=\"FieldName\">NotificationStatus</property>      </property>      <property name=\"Item2\" isnull=\"true\" iskey=\"true\">        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">1</property>        <property name=\"Width\">138</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colObjectType</property>        <property name=\"OptionsColumn\" isnull=\"true\" iskey=\"true\">          <property name=\"AllowFocus\">false</property>        </property>        <property name=\"FieldName\">ObjectType</property>      </property>      <property name=\"Item3\" isnull=\"true\" iskey=\"true\">        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">2</property>        <property name=\"Width\">401</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colSubject</property>        <property name=\"OptionsColumn\" isnull=\"true\" iskey=\"true\">          <property name=\"AllowFocus\">false</property>        </property>        <property name=\"FieldName\">Subject</property>      </property>      <property name=\"Item4\" isnull=\"true\" iskey=\"true\">        <property name=\"GroupInterval\">DateRange</property>        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">3</property>        <property name=\"Width\">199</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colCreatedOn</property>        <property name=\"OptionsColumn\" isnull=\"true\" iskey=\"true\">          <property name=\"AllowFocus\">false</property>        </property>        <property name=\"OptionsFilter\" isnull=\"true\" iskey=\"true\">          <property name=\"FilterPopupMode\">DateAlt</property>        </property>        <property name=\"FieldName\">CreatedOn</property>      </property>      <property name=\"Item5\" isnull=\"true\" iskey=\"true\">        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">4</property>        <property name=\"Width\">118</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colCreatedBy</property>        <property name=\"OptionsColumn\" isnull=\"true\" iskey=\"true\">          <property name=\"AllowFocus\">false</property>        </property>        <property name=\"FieldName\">CreatedById</property>      </property>      <property name=\"Item6\" isnull=\"true\" iskey=\"true\">        <property name=\"Visible\">true</property>        <property name=\"VisibleIndex\">5</property>        <property name=\"Width\">539</property>        <property name=\"ColumnEditName\" />        <property name=\"Name\">colContent</property>        <property name=\"OptionsColumn\" isnull=\"true\" iskey=\"true\">          <property name=\"AllowFocus\">false</property>        </property>        <property name=\"FieldName\">Body</property>      </property>    </property>    <property name=\"ViewCaption\" />    <property name=\"BorderStyle\">Default</property>    <property name=\"SynchronizeClones\">true</property>    <property name=\"DetailTabHeaderLocation\">Top</property>    <property name=\"Name\">gridView1</property>    <property name=\"DetailHeight\">350</property>    <property name=\"ActiveFilterEnabled\">true</property>    <property name=\"VertScrollTipFieldName\" />    <property name=\"GroupFormat\">[#image]{1} {2}</property>    <property name=\"OptionsView\" isnull=\"true\" iskey=\"true\">      <property name=\"ShowFilterPanelMode\">Never</property>      <property name=\"ShowIndicator\">false</property>      <property name=\"ShowVerticalLines\">False</property>      <property name=\"ShowGroupPanel\">false</property>      <property name=\"ShowGroupedColumns\">true</property>      <property name=\"GroupDrawMode\">Office2003</property>    </property>    <property name=\"OptionsBehavior\" isnull=\"true\" iskey=\"true\">      <property name=\"AutoExpandAllGroups\">true</property>      <property name=\"AllowFixedGroups\">True</property>    </property>    <property name=\"OptionsPrint\" isnull=\"true\" iskey=\"true\">      <property name=\"PrintVertLines\">false</property>      <property name=\"PrintHorzLines\">false</property>    </property>    <property name=\"FixedLineWidth\">2</property>    <property name=\"ChildGridLevelName\" />    <property name=\"IndicatorWidth\">-1</property>    <property name=\"ColumnPanelRowHeight\">-1</property>    <property name=\"VertScrollVisibility\">Auto</property>    <property name=\"GroupRowHeight\">-1</property>    <property name=\"HorzScrollVisibility\">Auto</property>    <property name=\"FooterPanelHeight\">-1</property>    <property name=\"RowSeparatorHeight\">0</property>    <property name=\"RowHeight\">-1</property>    <property name=\"ActiveFilterString\" />    <property name=\"GroupSummary\" iskey=\"true\" value=\"1\">      <property name=\"Item1\" isnull=\"true\" iskey=\"true\">        <property name=\"ShowInGroupColumnFooterName\" />        <property name=\"Tag\" isnull=\"true\" />        <property name=\"FieldName\">Subject</property>        <property name=\"DisplayFormat\">({0} items)</property>        <property name=\"SummaryType\">Count</property>      </property>    </property>    <property name=\"SortInfo\">~Xtra#Base64AAEAAAD/////AQAAAAAAAAAMAgAAAF1EZXZFeHByZXNzLlh0cmFHcmlkLnYxMi4xLCBWZXJzaW9uPTEyLjEuNy4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI4OGQxNzU0ZDcwMGU0OWEFAQAAADhEZXZFeHByZXNzLlh0cmFHcmlkLkNvbHVtbnMuR3JpZENvbHVtblNvcnRJbmZvQ29sbGVjdGlvbgQAAAAKZ3JvdXBDb3VudAVjbG9uZQ9jbG9uZUdyb3VwQ291bnQTQ29sbGVjdGlvbkJhc2UrbGlzdAADAAMIsgFTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5MaXN0YDFbW0RldkV4cHJlc3MuWHRyYUdyaWQuQ29sdW1ucy5HcmlkQ29sdW1uU29ydEluZm8sIERldkV4cHJlc3MuWHRyYUdyaWQudjEyLjEsIFZlcnNpb249MTIuMS43LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YV1dCBxTeXN0ZW0uQ29sbGVjdGlvbnMuQXJyYXlMaXN0AgAAAAEAAAAJAwAAAAAAAAAJBAAAAAQDAAAAsgFTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5MaXN0YDFbW0RldkV4cHJlc3MuWHRyYUdyaWQuQ29sdW1ucy5HcmlkQ29sdW1uU29ydEluZm8sIERldkV4cHJlc3MuWHRyYUdyaWQudjEyLjEsIFZlcnNpb249MTIuMS43LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YV1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAwRGV2RXhwcmVzcy5YdHJhR3JpZC5Db2x1bW5zLkdyaWRDb2x1bW5Tb3J0SW5mb1tdAgAAAAgICQUAAAAAAAAAAAAAAAQEAAAAHFN5c3RlbS5Db2xsZWN0aW9ucy5BcnJheUxpc3QDAAAABl9pdGVtcwVfc2l6ZQhfdmVyc2lvbgUAAAgICQYAAAABAAAABAAAAAcFAAAAAAEAAAAAAAAABC5EZXZFeHByZXNzLlh0cmFHcmlkLkNvbHVtbnMuR3JpZENvbHVtblNvcnRJbmZvAgAAABAGAAAABAAAAAkHAAAADQMMCAAAABlEZXZFeHByZXNzLlh0cmFHcmlkLnYxMi4xBQcAAAAuRGV2RXhwcmVzcy5YdHJhR3JpZC5Db2x1bW5zLkdyaWRDb2x1bW5Tb3J0SW5mbwIAAAAJU29ydE9yZGVyCkNvbHVtbk5hbWUAAQgIAAAAAgAAAAYJAAAADGNvbENyZWF0ZWRPbgs=</property>    <property name=\"FormatConditions\" iskey=\"true\" value=\"1\">      <property name=\"Item1\" isnull=\"true\" iskey=\"true\">        <property name=\"ColumnName\">colNotificationStatus</property>        <property name=\"ApplyToRow\">true</property>        <property name=\"Appearance\" isnull=\"true\" iskey=\"true\">          <property name=\"Options\" isnull=\"true\" iskey=\"true\">            <property name=\"UseFont\">true</property>          </property>          <property name=\"Font\">Tahoma, 8.25pt, style=Bold</property>        </property>        <property name=\"Condition\">Equal</property>        <property name=\"Value1\" type=\"System.Int32\">0</property>      </property>    </property>    <property name=\"GroupSummarySortInfoState\" />    <property name=\"FindFilterText\" />    <property name=\"FindPanelVisible\">false</property>  </XtraSerializer>";
            Update.Table("SavedQuery").Set(new { LayoutXml = layoutXml, ReturnedTypeId = "27628829-20C3-48A2-A488-676C0DF9FDBE", Name = "User Notification List" })
                .Where(new { SavedQueryId = "C03E4108-EB11-49E1-AEDD-5CEA4CEBB022" });

            layoutXml = "<XtraSerializer version=\"1.0\" application=\"View\">    <property name=\"#LayoutVersion\" />    <property name=\"ShowButtonMode\">ShowForFocusedCell</property>    <property name=\"ActiveFilterEnabled\">true</property>    <property name=\"OptionsSelection\" isnull=\"true\" iskey=\"true\">      <property name=\"MultiSelect\">false</property>    </property>    <property name=\"BorderStyle\">Default</property>    <property name=\"ViewCaption\" />    <property name=\"DetailTabHeaderLocation\">Top</property>    <property name=\"SynchronizeClones\">true</property>    <property name=\"DetailHeight\">350</property>    <property name=\"DetailAutoHeight\">true</property>    <property name=\"CardVertInterval\">2</property>    <property name=\"ViewCaptionHeight\">-1</property>    <property name=\"FieldCaptionFormat\" />    <property name=\"Name\">layoutView1</property>    <property name=\"Columns\" iskey=\"true\" value=\"6\">      <property name=\"Item1\" isnull=\"true\" iskey=\"true\">        <property name=\"CustomizationCaption\">Subject</property>        <property name=\"ColumnEditName\" />        <property name=\"AppearanceCell\" isnull=\"true\" iskey=\"true\">          <property name=\"Options\" isnull=\"true\" iskey=\"true\">            <property name=\"UseFont\">true</property>          </property>          <property name=\"Font\">Tahoma, 9pt, style=Bold</property>        </property>        <property name=\"FieldName\">Subject</property>        <property name=\"ImageAlignment\">Near</property>        <property name=\"Visible\">true</property>        <property name=\"ToolTip\" />        <property name=\"VisibleIndex\">-1</property>        <property name=\"Name\">colSubject</property>      </property>      <property name=\"Item2\" isnull=\"true\" iskey=\"true\">        <property name=\"CustomizationCaption\">NoteTextItemMemoEdit</property>        <property name=\"ColumnEditName\" />        <property name=\"Caption\">NoteTextItemMemoEdit</property>        <property name=\"FieldName\">NoteText</property>        <property name=\"ImageAlignment\">Near</property>        <property name=\"Visible\">true</property>        <property name=\"ToolTip\" />        <property name=\"VisibleIndex\">-1</property>        <property name=\"Name\">colNoteText</property>      </property>      <property name=\"Item3\" isnull=\"true\" iskey=\"true\">        <property name=\"CustomizationCaption\">Created By Id</property>        <property name=\"ColumnEditName\" />        <property name=\"FieldName\">CreatedById</property>        <property name=\"ImageAlignment\">Near</property>        <property name=\"Visible\">true</property>        <property name=\"ToolTip\" />        <property name=\"VisibleIndex\">-1</property>        <property name=\"Name\">colCreatedBy</property>      </property>      <property name=\"Item4\" isnull=\"true\" iskey=\"true\">        <property name=\"CustomizationCaption\">Created On</property>        <property name=\"ColumnEditName\" />        <property name=\"SortMode\">Value</property>        <property name=\"AppearanceCell\" isnull=\"true\" iskey=\"true\">          <property name=\"Options\" isnull=\"true\" iskey=\"true\">            <property name=\"UseForeColor\">true</property>          </property>          <property name=\"ForeColor\">Gray</property>        </property>        <property name=\"DisplayFormat\" isnull=\"true\" iskey=\"true\">          <property name=\"FormatString\">g</property>          <property name=\"FormatType\">DateTime</property>        </property>        <property name=\"FieldName\">CreatedOn</property>        <property name=\"ImageAlignment\">Near</property>        <property name=\"Visible\">true</property>        <property name=\"ToolTip\" />        <property name=\"VisibleIndex\">-1</property>        <property name=\"Name\">colCreatedOn</property>      </property>      <property name=\"Item5\" isnull=\"true\" iskey=\"true\">        <property name=\"CustomizationCaption\">Modified By Id</property>        <property name=\"ColumnEditName\" />        <property name=\"FieldName\">ModifiedById</property>        <property name=\"ImageAlignment\">Near</property>        <property name=\"Visible\">true</property>        <property name=\"ToolTip\" />        <property name=\"VisibleIndex\">-1</property>        <property name=\"Name\">colModifiedBy</property>      </property>      <property name=\"Item6\" isnull=\"true\" iskey=\"true\">        <property name=\"CustomizationCaption\">Modified On</property>        <property name=\"ColumnEditName\" />        <property name=\"FieldName\">ModifiedOn</property>        <property name=\"OptionsColumn\" isnull=\"true\" iskey=\"true\">          <property name=\"AllowEdit\">false</property>        </property>        <property name=\"ImageAlignment\">Near</property>        <property name=\"Visible\">true</property>        <property name=\"ToolTip\" />        <property name=\"VisibleIndex\">-1</property>        <property name=\"Name\">colModifiedOn</property>      </property>    </property>    <property name=\"CardMinSize\">@3,Width=418@2,Height=60</property>    <property name=\"OptionsView\" isnull=\"true\" iskey=\"true\">      <property name=\"ShowFilterPanelMode\">Never</property>      <property name=\"ViewMode\">Column</property>      <property name=\"ShowCardCaption\">false</property>      <property name=\"CardArrangeRule\">AllowPartialCards</property>      <property name=\"ShowHeaderPanel\">false</property>    </property>    <property name=\"OptionsBehavior\" isnull=\"true\" iskey=\"true\">      <property name=\"Editable\">false</property>    </property>    <property name=\"CardHorzInterval\">2</property>    <property name=\"OptionsMultiRecordMode\" isnull=\"true\" iskey=\"true\">      <property name=\"MultiColumnScrollBarOrientation\">Default</property>      <property name=\"MultiRowScrollBarOrientation\">Default</property>      <property name=\"StretchCardToViewWidth\">true</property>      <property name=\"StretchCardToViewHeight\">false</property>      <property name=\"MaxCardRows\">0</property>      <property name=\"MaxCardColumns\">0</property>    </property>    <property name=\"OptionsSingleRecordMode\" isnull=\"true\" iskey=\"true\">      <property name=\"StretchCardToViewWidth\">false</property>      <property name=\"StretchCardToViewHeight\">false</property>      <property name=\"CardAlignment\">Center</property>    </property>    <property name=\"OptionsItemText\" isnull=\"true\" iskey=\"true\">      <property name=\"AlignMode\">AlignGlobal</property>      <property name=\"TextToControlDistance\">5</property>    </property>    <property name=\"OptionsCustomization\" isnull=\"true\" iskey=\"true\">      <property name=\"AllowSort\">false</property>      <property name=\"AllowFilter\">false</property>      <property name=\"UseAdvancedRuntimeCustomization\">false</property>      <property name=\"ShowGroupLayoutTreeView\">true</property>      <property name=\"ShowGroupHiddenItems\">true</property>      <property name=\"ShowResetShrinkButtons\">true</property>      <property name=\"ShowGroupCardIndents\">true</property>      <property name=\"ShowGroupCardCaptions\">true</property>      <property name=\"ShowSaveLoadLayoutButtons\">true</property>      <property name=\"ShowGroupView\">true</property>      <property name=\"ShowGroupLayout\">true</property>      <property name=\"ShowGroupCards\">true</property>      <property name=\"ShowGroupFields\">true</property>    </property>    <property name=\"OptionsHeaderPanel\" isnull=\"true\" iskey=\"true\">      <property name=\"ShowSingleModeButton\">true</property>      <property name=\"EnableSingleModeButton\">true</property>      <property name=\"ShowRowModeButton\">true</property>      <property name=\"EnableRowModeButton\">true</property>      <property name=\"ShowColumnModeButton\">true</property>      <property name=\"EnableColumnModeButton\">true</property>      <property name=\"ShowMultiRowModeButton\">true</property>      <property name=\"EnableMultiRowModeButton\">true</property>      <property name=\"ShowMultiColumnModeButton\">true</property>      <property name=\"EnableMultiColumnModeButton\">true</property>      <property name=\"ShowCarouselModeButton\">true</property>      <property name=\"EnableCarouselModeButton\">true</property>      <property name=\"ShowPanButton\">true</property>      <property name=\"EnablePanButton\">true</property>      <property name=\"ShowCustomizeButton\">true</property>      <property name=\"EnableCustomizeButton\">true</property>    </property>    <property name=\"CardCaptionFormat\" />    <property name=\"OptionsCarouselMode\" isnull=\"true\" iskey=\"true\">      <property name=\"StretchCardToViewWidth\">false</property>      <property name=\"StretchCardToViewHeight\">false</property>      <property name=\"InterpolationMode\">Default</property>      <property name=\"CenterOffset\">@1,X=0@1,Y=0</property>      <property name=\"FrameCount\">250</property>      <property name=\"FrameDelay\">10000</property>      <property name=\"CardCount\">15</property>      <property name=\"RollAngle\">3.14159274</property>      <property name=\"Radius\">0</property>      <property name=\"PitchAngle\">1.57079637</property>      <property name=\"BottomCardScale\">0.2</property>      <property name=\"BottomCardFading\">0</property>      <property name=\"BottomCardAlphaLevel\">0</property>    </property>    <property name=\"SortInfo\">~Xtra#Base64AAEAAAD/////AQAAAAAAAAAMAgAAAF1EZXZFeHByZXNzLlh0cmFHcmlkLnYxMi4xLCBWZXJzaW9uPTEyLjEuNy4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI4OGQxNzU0ZDcwMGU0OWEFAQAAADhEZXZFeHByZXNzLlh0cmFHcmlkLkNvbHVtbnMuR3JpZENvbHVtblNvcnRJbmZvQ29sbGVjdGlvbgQAAAAKZ3JvdXBDb3VudAVjbG9uZQ9jbG9uZUdyb3VwQ291bnQTQ29sbGVjdGlvbkJhc2UrbGlzdAADAAMIsgFTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5MaXN0YDFbW0RldkV4cHJlc3MuWHRyYUdyaWQuQ29sdW1ucy5HcmlkQ29sdW1uU29ydEluZm8sIERldkV4cHJlc3MuWHRyYUdyaWQudjEyLjEsIFZlcnNpb249MTIuMS43LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YV1dCBxTeXN0ZW0uQ29sbGVjdGlvbnMuQXJyYXlMaXN0AgAAAAAAAAAJAwAAAAAAAAAJBAAAAAQDAAAAsgFTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5MaXN0YDFbW0RldkV4cHJlc3MuWHRyYUdyaWQuQ29sdW1ucy5HcmlkQ29sdW1uU29ydEluZm8sIERldkV4cHJlc3MuWHRyYUdyaWQudjEyLjEsIFZlcnNpb249MTIuMS43LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YV1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAwRGV2RXhwcmVzcy5YdHJhR3JpZC5Db2x1bW5zLkdyaWRDb2x1bW5Tb3J0SW5mb1tdAgAAAAgICQUAAAAAAAAAAAAAAAQEAAAAHFN5c3RlbS5Db2xsZWN0aW9ucy5BcnJheUxpc3QDAAAABl9pdGVtcwVfc2l6ZQhfdmVyc2lvbgUAAAgICQYAAAABAAAABAAAAAcFAAAAAAEAAAAAAAAABC5EZXZFeHByZXNzLlh0cmFHcmlkLkNvbHVtbnMuR3JpZENvbHVtblNvcnRJbmZvAgAAABAGAAAABAAAAAkHAAAADQMMCAAAABlEZXZFeHByZXNzLlh0cmFHcmlkLnYxMi4xBQcAAAAuRGV2RXhwcmVzcy5YdHJhR3JpZC5Db2x1bW5zLkdyaWRDb2x1bW5Tb3J0SW5mbwIAAAAJU29ydE9yZGVyCkNvbHVtbk5hbWUAAQgIAAAAAgAAAAYJAAAADGNvbENyZWF0ZWRPbgs=</property>    <property name=\"Items\" iskey=\"true\" value=\"7\">      <property name=\"Item1\" isnull=\"true\" iskey=\"true\">        <property name=\"ExpandButtonLocation\">AfterText</property>        <property name=\"ParentName\" />        <property name=\"AppearanceItemCaption\" isnull=\"true\" iskey=\"true\">          <property name=\"ForeColor\" />          <property name=\"BorderColor\" />          <property name=\"BackColor\" />          <property name=\"BackColor2\" />          <property name=\"Font\">Tahoma, 9pt</property>          <property name=\"GradientMode\">Horizontal</property>        </property>        <property name=\"Name\">layoutViewTemplateCard</property>        <property name=\"OptionsToolTip\" isnull=\"true\" iskey=\"true\">          <property name=\"ToolTip\" />          <property name=\"ToolTipTitle\" />          <property name=\"ToolTipIconType\">None</property>          <property name=\"IconToolTip\" />          <property name=\"IconToolTipTitle\" />          <property name=\"IconToolTipIconType\">None</property>          <property name=\"EnableIconToolTip\">true</property>        </property>        <property name=\"TextToControlDistance\">0</property>        <property name=\"AppearanceTabPage\" isnull=\"true\" iskey=\"true\">          <property name=\"Header\" isnull=\"true\" iskey=\"true\">            <property name=\"ForeColor\" />            <property name=\"BorderColor\" />            <property name=\"BackColor\" />            <property name=\"BackColor2\" />            <property name=\"Font\">Tahoma, 9pt</property>            <property name=\"GradientMode\">Horizontal</property>          </property>          <property name=\"HeaderActive\" isnull=\"true\" iskey=\"true\">            <property name=\"ForeColor\" />            <property name=\"BorderColor\" />            <property name=\"BackColor\" />            <property name=\"BackColor2\" />            <property name=\"Font\">Tahoma, 9pt</property>            <property name=\"GradientMode\">Horizontal</property>          </property>          <property name=\"HeaderDisabled\" isnull=\"true\" iskey=\"true\">            <property name=\"ForeColor\" />            <property name=\"BorderColor\" />            <property name=\"BackColor\" />            <property name=\"BackColor2\" />            <property name=\"Font\">Tahoma, 9pt</property>            <property name=\"GradientMode\">Horizontal</property>          </property>          <property name=\"HeaderHotTracked\" isnull=\"true\" iskey=\"true\">            <property name=\"ForeColor\" />            <property name=\"BorderColor\" />            <property name=\"BackColor\" />            <property name=\"BackColor2\" />            <property name=\"Font\">Tahoma, 9pt</property>            <property name=\"GradientMode\">Horizontal</property>          </property>          <property name=\"PageClient\" isnull=\"true\" iskey=\"true\">            <property name=\"ForeColor\" />            <property name=\"BorderColor\" />            <property name=\"BackColor\" />            <property name=\"BackColor2\" />            <property name=\"Font\">Tahoma, 9pt</property>            <property name=\"GradientMode\">Horizontal</property>          </property>        </property>        <property name=\"OptionsCustomization\" isnull=\"true\" iskey=\"true\">          <property name=\"AllowDrag\">Default</property>          <property name=\"AllowDrop\">Default</property>        </property>        <property name=\"OptionsItemText\" isnull=\"true\" iskey=\"true\">          <property name=\"TextToControlDistance\">5</property>          <property name=\"TextAlignMode\">UseParentOptions</property>        </property>        <property name=\"AppearanceGroup\" isnull=\"true\" iskey=\"true\">          <property name=\"ForeColor\" />          <property name=\"BorderColor\" />          <property name=\"BackColor\" />          <property name=\"BackColor2\" />          <property name=\"Font\">Tahoma, 9pt</property>          <property name=\"GradientMode\">Horizontal</property>        </property>        <property name=\"TypeName\">LayoutViewCard</property>        <property name=\"Location\">@1,X=0@1,Y=0</property>        <property name=\"Size\">@3,Width=418@2,Height=62</property>        <property name=\"ExpandButtonVisible\">false</property>        <property name=\"CustomizationFormText\">TemplateCard</property>        <property name=\"Text\">TemplateCard</property>        <property name=\"ExpandOnDoubleClick\">false</property>        <property name=\"GroupBordersVisible\">false</property>        <property name=\"TabbedGroupParentName\" />      </property>      <property name=\"Item2\" isnull=\"true\" iskey=\"true\">        <property name=\"TypeName\">LayoutViewField</property>        <property name=\"TextToControlDistance\">0</property>        <property name=\"TextSize\">@1,Width=0@1,Height=0</property>        <property name=\"OptionsCustomization\" isnull=\"true\" iskey=\"true\">          <property name=\"AllowDrag\">Default</property>          <property name=\"AllowDrop\">Default</property>        </property>        <property name=\"OptionsToolTip\" isnull=\"true\" iskey=\"true\">          <property name=\"ToolTip\" />          <property name=\"ToolTipTitle\" />          <property name=\"ToolTipIconType\">None</property>          <property name=\"IconToolTip\" />          <property name=\"IconToolTipTitle\" />          <property name=\"IconToolTipIconType\">None</property>          <property name=\"EnableIconToolTip\">true</property>        </property>        <property name=\"TextVisible\">false</property>        <property name=\"Name\">layoutViewField_colSubject1</property>        <property name=\"AppearanceItemCaption\" isnull=\"true\" iskey=\"true\">          <property name=\"ForeColor\" />          <property name=\"BorderColor\" />          <property name=\"BackColor\" />          <property name=\"BackColor2\" />          <property name=\"Font\">Tahoma, 9pt</property>          <property name=\"GradientMode\">Horizontal</property>        </property>        <property name=\"ParentName\">layoutViewTemplateCard</property>        <property name=\"Location\">@2,X=80@1,Y=0</property>        <property name=\"ControlName\" isnull=\"true\" />        <property name=\"ColumnName\">colSubject</property>        <property name=\"EditorPreferredWidth\">194</property>        <property name=\"Size\">@3,Width=198@2,Height=20</property>        <property name=\"Text\">Subject:</property>        <property name=\"ShowInCustomizationForm\">true</property>        <property name=\"CustomizationFormText\">Subject</property>      </property>      <property name=\"Item3\" isnull=\"true\" iskey=\"true\">        <property name=\"TypeName\">LayoutViewField</property>        <property name=\"TextToControlDistance\">0</property>        <property name=\"TextSize\">@1,Width=0@1,Height=0</property>        <property name=\"OptionsCustomization\" isnull=\"true\" iskey=\"true\">          <property name=\"AllowDrag\">Default</property>          <property name=\"AllowDrop\">Default</property>        </property>        <property name=\"OptionsToolTip\" isnull=\"true\" iskey=\"true\">          <property name=\"ToolTip\" />          <property name=\"ToolTipTitle\" />          <property name=\"ToolTipIconType\">None</property>          <property name=\"IconToolTip\" />          <property name=\"IconToolTipTitle\" />          <property name=\"IconToolTipIconType\">None</property>          <property name=\"EnableIconToolTip\">true</property>        </property>        <property name=\"TextVisible\">false</property>        <property name=\"Name\">layoutViewField_colNoteText</property>        <property name=\"AppearanceItemCaption\" isnull=\"true\" iskey=\"true\">          <property name=\"ForeColor\" />          <property name=\"BorderColor\" />          <property name=\"BackColor\" />          <property name=\"BackColor2\" />          <property name=\"Font\">Tahoma, 9pt</property>          <property name=\"GradientMode\">Horizontal</property>        </property>        <property name=\"SizeConstraintsType\">SupportHorzAlignment</property>        <property name=\"ParentName\">layoutViewTemplateCard</property>        <property name=\"Location\">@2,X=80@2,Y=20</property>        <property name=\"ControlName\" isnull=\"true\" />        <property name=\"ColumnName\">colNoteText</property>        <property name=\"EditorPreferredWidth\">314</property>        <property name=\"Size\">@3,Width=318@2,Height=22</property>        <property name=\"Text\">NoteTextItemMemoEdit:</property>        <property name=\"ShowInCustomizationForm\">true</property>        <property name=\"CustomizationFormText\">NoteTextItemMemoEdit</property>      </property>      <property name=\"Item4\" isnull=\"true\" iskey=\"true\">        <property name=\"TypeName\">LayoutViewField</property>        <property name=\"MaxSize\">@2,Width=80@2,Height=20</property>        <property name=\"MinSize\">@2,Width=80@2,Height=20</property>        <property name=\"TextToControlDistance\">0</property>        <property name=\"TextSize\">@1,Width=0@1,Height=0</property>        <property name=\"OptionsCustomization\" isnull=\"true\" iskey=\"true\">          <property name=\"AllowDrag\">Default</property>          <property name=\"AllowDrop\">Default</property>        </property>        <property name=\"OptionsToolTip\" isnull=\"true\" iskey=\"true\">          <property name=\"ToolTip\" />          <property name=\"ToolTipTitle\" />          <property name=\"ToolTipIconType\">None</property>          <property name=\"IconToolTip\" />          <property name=\"IconToolTipTitle\" />          <property name=\"IconToolTipIconType\">None</property>          <property name=\"EnableIconToolTip\">true</property>        </property>        <property name=\"TextVisible\">false</property>        <property name=\"Name\">layoutViewField_colCreatedById1</property>        <property name=\"AppearanceItemCaption\" isnull=\"true\" iskey=\"true\">          <property name=\"ForeColor\" />          <property name=\"BorderColor\" />          <property name=\"BackColor\" />          <property name=\"BackColor2\" />          <property name=\"Font\">Tahoma, 9pt</property>          <property name=\"GradientMode\">Horizontal</property>        </property>        <property name=\"SizeConstraintsType\">Custom</property>        <property name=\"TextAlignMode\">CustomSize</property>        <property name=\"ParentName\">layoutViewTemplateCard</property>        <property name=\"Location\">@1,X=0@1,Y=0</property>        <property name=\"ControlName\" isnull=\"true\" />        <property name=\"ColumnName\">colCreatedBy</property>        <property name=\"EditorPreferredWidth\">76</property>        <property name=\"Size\">@2,Width=80@2,Height=42</property>        <property name=\"Text\">Created By_p_Full Name:</property>        <property name=\"ShowInCustomizationForm\">true</property>        <property name=\"CustomizationFormText\">Created By Id</property>      </property>      <property name=\"Item5\" isnull=\"true\" iskey=\"true\">        <property name=\"TypeName\">LayoutViewField</property>        <property name=\"MaxSize\">@3,Width=120@2,Height=20</property>        <property name=\"MinSize\">@3,Width=120@2,Height=20</property>        <property name=\"TextToControlDistance\">0</property>        <property name=\"TextSize\">@1,Width=0@1,Height=0</property>        <property name=\"OptionsCustomization\" isnull=\"true\" iskey=\"true\">          <property name=\"AllowDrag\">Default</property>          <property name=\"AllowDrop\">Default</property>        </property>        <property name=\"OptionsToolTip\" isnull=\"true\" iskey=\"true\">          <property name=\"ToolTip\" />          <property name=\"ToolTipTitle\" />          <property name=\"ToolTipIconType\">None</property>          <property name=\"IconToolTip\" />          <property name=\"IconToolTipTitle\" />          <property name=\"IconToolTipIconType\">None</property>          <property name=\"EnableIconToolTip\">true</property>        </property>        <property name=\"TextVisible\">false</property>        <property name=\"Name\">layoutViewField_colCreatedOn1</property>        <property name=\"AppearanceItemCaption\" isnull=\"true\" iskey=\"true\">          <property name=\"ForeColor\" />          <property name=\"BorderColor\" />          <property name=\"BackColor\" />          <property name=\"BackColor2\" />          <property name=\"Font\">Tahoma, 9pt</property>          <property name=\"GradientMode\">Horizontal</property>        </property>        <property name=\"SizeConstraintsType\">Custom</property>        <property name=\"TextAlignMode\">CustomSize</property>        <property name=\"ParentName\">layoutViewTemplateCard</property>        <property name=\"Location\">@3,X=278@1,Y=0</property>        <property name=\"ControlName\" isnull=\"true\" />        <property name=\"ColumnName\">colCreatedOn</property>        <property name=\"EditorPreferredWidth\">116</property>        <property name=\"Size\">@3,Width=120@2,Height=20</property>        <property name=\"Text\">Created On:</property>        <property name=\"ShowInCustomizationForm\">true</property>        <property name=\"CustomizationFormText\">Created On</property>      </property>      <property name=\"Item6\" isnull=\"true\" iskey=\"true\">        <property name=\"TypeName\">LayoutViewField</property>        <property name=\"MaxSize\">@1,Width=0@2,Height=20</property>        <property name=\"MinSize\">@2,Width=24@2,Height=20</property>        <property name=\"TextToControlDistance\">0</property>        <property name=\"TextSize\">@1,Width=0@1,Height=0</property>        <property name=\"OptionsCustomization\" isnull=\"true\" iskey=\"true\">          <property name=\"AllowDrag\">Default</property>          <property name=\"AllowDrop\">Default</property>        </property>        <property name=\"OptionsToolTip\" isnull=\"true\" iskey=\"true\">          <property name=\"ToolTip\" />          <property name=\"ToolTipTitle\" />          <property name=\"ToolTipIconType\">None</property>          <property name=\"IconToolTip\" />          <property name=\"IconToolTipTitle\" />          <property name=\"IconToolTipIconType\">None</property>          <property name=\"EnableIconToolTip\">true</property>        </property>        <property name=\"TextVisible\">false</property>        <property name=\"Name\">layoutViewField_colModifiedOn</property>        <property name=\"AppearanceItemCaption\" isnull=\"true\" iskey=\"true\">          <property name=\"ForeColor\" />          <property name=\"BorderColor\" />          <property name=\"BackColor\" />          <property name=\"BackColor2\" />          <property name=\"Font\">Tahoma, 9pt</property>          <property name=\"GradientMode\">Horizontal</property>        </property>        <property name=\"SizeConstraintsType\">Custom</property>        <property name=\"ParentName\">Customization</property>        <property name=\"Location\">@1,X=0@1,Y=0</property>        <property name=\"ControlName\" isnull=\"true\" />        <property name=\"ColumnName\">colModifiedOn</property>        <property name=\"EditorPreferredWidth\">20</property>        <property name=\"Size\">@3,Width=398@2,Height=42</property>        <property name=\"Text\">Modified On:</property>        <property name=\"ShowInCustomizationForm\">true</property>        <property name=\"CustomizationFormText\">Modified On</property>      </property>      <property name=\"Item7\" isnull=\"true\" iskey=\"true\">        <property name=\"TypeName\">LayoutViewField</property>        <property name=\"TextToControlDistance\">5</property>        <property name=\"TextSize\">@3,Width=101@2,Height=14</property>        <property name=\"OptionsCustomization\" isnull=\"true\" iskey=\"true\">          <property name=\"AllowDrag\">Default</property>          <property name=\"AllowDrop\">Default</property>        </property>        <property name=\"OptionsToolTip\" isnull=\"true\" iskey=\"true\">          <property name=\"ToolTip\" />          <property name=\"ToolTipTitle\" />          <property name=\"ToolTipIconType\">None</property>          <property name=\"IconToolTip\" />          <property name=\"IconToolTipTitle\" />          <property name=\"IconToolTipIconType\">None</property>          <property name=\"EnableIconToolTip\">true</property>        </property>        <property name=\"Name\">layoutViewField_colModifiedBy</property>        <property name=\"AppearanceItemCaption\" isnull=\"true\" iskey=\"true\">          <property name=\"ForeColor\" />          <property name=\"BorderColor\" />          <property name=\"BackColor\" />          <property name=\"BackColor2\" />          <property name=\"Font\">Tahoma, 9pt</property>          <property name=\"GradientMode\">Horizontal</property>        </property>        <property name=\"ParentName\">Customization</property>        <property name=\"Location\">@1,X=0@1,Y=0</property>        <property name=\"ControlName\" isnull=\"true\" />        <property name=\"ColumnName\">colModifiedBy</property>        <property name=\"EditorPreferredWidth\">20</property>        <property name=\"Size\">@3,Width=398@2,Height=42</property>        <property name=\"Text\">Modified By_p_Full Name:</property>        <property name=\"ShowInCustomizationForm\">true</property>        <property name=\"CustomizationFormText\">Modified By Id</property>      </property>    </property>    <property name=\"ActiveFilterString\" />    <property name=\"FormatConditions\" iskey=\"true\" value=\"0\" />    <property name=\"FindFilterText\" />    <property name=\"FindPanelVisible\">false</property>  </XtraSerializer>";
            Update.Table("SavedQuery").Set(new { LayoutXml = layoutXml, ReturnedTypeId = "DAE981F9-AD1F-4D94-A6C2-AC131DEE5AE2", Name = "Default Note List" })
                .Where(new { SavedQueryId = "3C35CBAB-4F0B-4485-BF0F-015150A44D43" });


        }
        public override void Down()
        {
            
        }
    }
}
